package org.sunnyleaf.votedemo.client.data;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class VoteRecordIndex {
	
	public VoteRecordIndex(){
		
	}
	
	public VoteRecordIndex( String sha1, Long voteRecordId){
		this.sha1 = sha1;
		this.voteRecordId = voteRecordId;
	}
	
	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private String sha1;  // sha1(email+voteRecordId+SEC_TOKEN)

	@Persistent
	private Long voteRecordId;

	/**
	 * @return the sha1
	 */
	public String getSha1() {
		return sha1;
	}

	/**
	 * @param sha1 the sha1 to set
	 */
	public void setSha1(String sha1) {
		this.sha1 = sha1;
	}

	/**
	 * @return the voteRecordId
	 */
	public Long getVoteRecordId() {
		return voteRecordId;
	}

	/**
	 * @param voteRecordId the voteRecordId to set
	 */
	public void setVoteRecordId(Long voteRecordId) {
		this.voteRecordId = voteRecordId;
	}

}
